<?php

namespace App\Models\Rbac;

use App\Models\BaseModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class UserRole extends BaseModel
{
    use HasFactory;
    protected $table="user_role";
    protected $fillable = [
        "role_id",
        "user_id",
        "created_at",
        "updated_at"
    ];

    public function user(){
        return $this->hasOne(User::class,'id','user_id');
    }

    public function role(){
        return $this->hasOne(Role::class,'id','role_id');
    }
}
